home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr47
/
qfml10.zip
/
QFML.INC
< prev
next >
Wrap
Text File
|
1995-01-26
|
5KB
|
165 lines
; QFM (Quick Flat Memory) Manajer
; (C)opyright 1995 by Render of ACC TEAM
;/* ==================================================
; Start 32-bit plane mode
; Parameters: None
; Returns: 0 if success
; 1 ERROR getting himmem address
; 2 ERROR enabling A20
; 3 ERROR CPU already under prottected mode
; 4 ERROR CPU running under DPMI, cannot intialize.
;===================================================== */
Extrn StartPL :far
;/* ==================================================
; Leave 32-bit plane mode
; Parameters: None
; Returns: 0 if success
; 1 ERROR Himem was used to start plane mode
; but it can not be found now.
; 2 ERROR Himem was used to start plane mode
; but cannot find it's address now.
; 3 ERROR Trying to disable a20
;===================================================== */
Extrn LeavePL :far
;/* ==================================================
; Open all memory available past the first Mg
; Parameters: None
; Returns: 0 if success
; 1 ERROR Getting max. block size
; 2 ERROR Getting max. block.
; 3 ERROR Locking max. block to get its address
;===================================================== */
Extrn OpenMem :far
;/* ==================================================
; Close all memory reserved by OpenMem
; Parameters: None
; Returns: 0 if success
; 1 ERROR Trying to unlock block of memory.
; 2 ERROR Deallocking block of memory.
;===================================================== */
Extrn CloseMem :far
;/* ==================================================
; Moves blocks of memory in plane mode. Size can be
; anything from 0 bytes to 2^32 bytes.
; Parameters: 1º Source offset. A 32 bit offset
; pointing to the block of memory
; defining source.
; 2º Destination offset. A 32 bit
; offset pointing to the block
; of memory to be used as destination.
; 3º Number of bytes to be moved.
; A 32-bit number ranging from 0 to 2^32.
;
; Returns: A long integer representing a 32-bit offset
; which is the last address used as destination+1.
;===================================================== */
Extrn Pl2Pl :far
;/* =====================================================================
; Moves blocks of memory in plane mode. Size can be
; anything from 0 bytes to 2^32 bytes. This one is
; for asm coding (parameters passed by registers).
; Parameters: ESI a 32-bit pointer offset pointing the source.
; EDI a 32-bit pointer offset pointing the destination.
; EBX a 32-bit integer containing the number of bytes to move
; Returns: EDI Last destination used + 1.
;======================================================================== */
Extrn Pl2Pla :far
;/* ==================================================
; Translates a memory address in the form of seg:off
; to an offset of 32 bits.
; Parameters: 1º SEGMENT
; 2º OFFSET
; Returns: OFFSET as a 32-bit number.
;===================================================== */
Extrn VirToPL :far
;/* ==================================================
; Translates a memory address in the form of seg:off
; to an offset of 32 bits. This one is for asm coders.
; Parameters passed by registers.
; Parameters: AX=SEGMENT
; BX=OFFSET
; Returns: EAX= OFFSET as a 32-bit number.
;===================================================== */
Extrn VirToPLa :far
;/* ==================================================
; Gives the start address of the memory block reserved
; by OpenMem.
; Parameters: None
; Returns: OFFSET to the start of the memory block allocated
; by OpenMem.
;===================================================== */
Extrn GiveSta :far
;/* ==================================================
; Get the amount of memory reserved by OpenMem()
; Parameters: None
; Returns: Number of Kilobytes allocated by OpenMem.
;===================================================== */
Extrn GiveAmo :far
;/* ==================================================
; These are the usual poke functions, ranging from
; byte to dword.
; Parameters: 1º OFFSET of memory to poke
; 2º DATA to poke.
; Returns: DATA poked.
;===================================================== */
Extrn Pokeb :far
Extrn Pokew :far
Extrn Pokedw :far
;/* ==================================================
; These are the usual peek functions, ranging from
; byte to dword.
; Parameters: 1º OFFSET of memory to poke
; Returns: DATA peeked.
;===================================================== */
Extrn Peekb :far
Extrn Peekw :far
Extrn Peekdw :far